<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<c:set var="ctx" value="${pageContext.request.contextPath }"/>
<jsp:include page="../inc.jsp"></jsp:include>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<style type="text/css">
		table#mfFormTb tr{
			height: 25px;
			border-bottom: 1px solid #d4d4d4;
			margin: 5px;
		}
		table#mfFormTb tr td:first-child{
			text-align: right;
		}	
		table#mfFormTb tr td{
			padding: 7px 3px;
		}
	</style>
	
	<script type="text/javascript">
		function thinkTime(nv){
			var date = new Date(nv.replace(/-/g,"/"));
			if(date <= new Date()){
				alert("时间已过期");
				$('#dueDate').datebox('setValue','');
			}
		}
	</script>
	
	<form id="mfDataForm">
		<div title="会费管理">
			<table id="mfFormTb" width="100%">
				<tr>
					<td width="100px">费用名称：</td>
					<td>
						<input type="hidden" name="id" value="${mf.id }">
						<input class="easyui-textbox" name="name" 
						value="${mf.name }" required=true>
					</td>
				</tr>
				<tr>
					<td width="100px">应缴费用：</td>
					<td>
						<input id="shouldPayMF" class="easyui-textbox" name="shouldPayMF" 
						value="${mf.shouldPayMF }" required=true>
					</td>
				</tr>
				<tr>
					<td width="100px">到期时间：</td>
					<td>
						<input id="dueDate" class="easyui-datebox" name="dueDate" 
						value="${mf.dueDate }" editable=false data-options="
						required:true,
						onChange:function(nv,ov){
							thinkTime(nv);
						}">
					</td>
				</tr>
				<tr>
					<td width="100px">性质：</td>
					<td>
						<input id="nature" class="easyui-combobox" value="${mf.nature }" name="nature" required=true 
						data-options="valueField:'id',textField:'name',url:'${ctx }/mfnc/find.coc'">
					</td>
				</tr>
			</table>
		</div>
	</form>
	
</body>
</html>